const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
// const axisProps = require('../tw-lib-base/chart/axis-props')
// const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  // ...axisProps,
  // ...datazoomProps,
  ...tooltipProps,

  data: {
    type: Array,
    default () {
      return [
        ['姓名', '数值','数值1','数值2', 'max'],
        ['语文', 43.3, 43.3, 43.3, 100],
        ['数学', 83.1, 63.3, 43.3, 100],
        ['英语', 86.4, 83.3, 43.3, 100],
        ['物理', 84.4, 93.3, 43.3, 100]
      ]
    },
    name: '外图表数据集',
    filedType: 'api'
  },
  dataLength: {
    type: String,
    default: '2',
    name: '数据项个数',
    filedType: 'string'
  },

  radiusLength: {
    type: String,
    default: '60%',
    name: '雷达图半径',
    filedType: 'string'
  },
  radarX: {
    type: String,
    default: '50%',
    name: '中心点横坐标位置',
    filedType: 'string'
  },
  radarY: {
    type: String,
    default: '55%',
    name: '中心点纵坐标位置',
    filedType: 'string'
  },
  startAngle: {
    type: String,
    default: '90',
    name: '起始点角度',
    filedType: 'string'
  },
  showName: {
    type: Boolean,
    default: true,
    name: '显示指示器名称',
    filedType: 'switch'
  },
  radarNameColor: {
    type: String,
    default: '#fff',
    name: '主标题颜色',
    filedType: 'color'
  },
  radarNameFontSize: {
    type: String,
    default: '12',
    name: '主标题字体',
    filedType: 'string'
  },
  radarNameBgColor: {
    type: String,
    default: '#999',
    name: '主标题颜色',
    filedType: 'color'
  },
  shape: {
    type: String,
    default: 'circle',
    name: '雷达图类型',
    filedType: 'select',
    options: [
      {
        name: 'circle',
        value: 'circle'
      },
      {
        name: 'polygon',
        value: 'polygon'
      }
    ]
  },
  triggerType: {
    type: String,
    default: 'item',
    name: '触发类型',
    filedType: 'string'
  },
  showAxis: {
    type: Boolean,
    default: false,
    name: '显示坐标轴',
    filedType: 'switch'
  },
  areaStyle: {
    type: Boolean,
    default: true,
    name: '区域填充',
    filedType: 'switch'
  },
  areaStyleOpacity: {
    type: String,
    default: '0.3',
    name: '区域填充透明度',
    filedType: 'string'
  },
  splitAreaColors: {
    type: Array,
    default () {
      return [
        'rgba(250,250,250,0.3)',
        'rgba(200,200,200,0.3)'
      ]
    },
    name: '分隔区域颜色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 10
  },
  splitLineColors: {
    type: Array,
    default () {
      return [
        '#ccc'
      ]
    },
    name: '分隔线颜色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 10
  },
  axisLineColor: {
    type: String,
    default: '#333',
    name: '坐标轴线颜色',
    filedType: 'color'
  },
  symbolSize: {
    type: String,
    default: '4',
    name: '线条标记大小',
    filedType: 'string'
  },
  lineWidth: {
    type: String,
    default: '2',
    name: '线条粗细',
    filedType: 'string'
  },

  lineName: {
    type: String,
    default: '',
    name: '线条为点类型',
    filedType: 'string'
  },

  ...nodata
}
